<template>
  <el-row>
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
    <!--    <BroadCast v-show="currTabNum===1"/>-->
    <!--    <AreaBroad v-show="currTabNum===2"/>-->
  </el-row>
</template>

<script>
// ------------- 自定义组件 ----------------
// import BroadCast from "./broadcast"
// import AreaBroad from "./areaBroad"

export default {
  // components: {
  //   BroadCast, AreaBroad
  // },
  props: {
    currTabNum: {
      type: Number,
      default: 1
    },
  },
  watch: {
    currTabNum: function (val) {
      switch (val) {
        case 1:
          this.$router.push({name: "broad"});
          break;
        case 2:
          this.$router.push({name: "area"});
          // location.reload();
          break;
        default:
          break;
      }
    }
  }
}
</script>

<style>
</style>